package com.example.feed.multichannel;

import com.example.feed.FeedPageRouteList;
import com.x.uikit.link.XLink;
import com.x.uikit.link.XParams;
import com.x.uikit.router.XNavigator;

public class CardEventHandler implements XLink.EventObserver {
    public interface EventIds {
        int CARD_CLICK = 1;
    }

    @Override
    public void onEvent(int eventId, XParams params, XParams result) {
        switch (eventId) {
            case EventIds.CARD_CLICK:
                String url=XParams.fetch(params,"url",String.class,"www.baidu.com");
                XNavigator.with(FeedPageRouteList.NATIVE_WEB).putArgument("url",url).navigate();
                break;
        }
    }
}
